﻿(function ($) {
    var methods = {
        show: function () {
            return this.each(function () {
                var $this = $(this);
                $this.animate({ top: 0, opacity: 'show' }, { duration: 400, queue: true });
            });
        },
        hide: function () {
            return this.each(function () {
                var $this = $(this);
                $this.animate({ top: -500, opacity: 'hide' }, { duration: 300, queue: false });
            });
        }
    };

    $.fn.flowMap = function (method) {
        if (methods[method]) {
            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
        } else if (typeof method === 'object' || !method) {
            return methods.init.apply(this, arguments);
        } else {
            $.error('Method ' + method + ' does not exist on jQuery.tooltip');
        }
    };
})(jQuery);

$(function () {
    $(".togglebtn").click(function () {//关闭流程图
        $(".FlowCharDiv_C").flowMap("hide")
    });
    resizeFlowMap();
});

$(window).resize(function () {
    resizeFlowMap();
});
var resizeFlowMap = function () {
    var dHeight = $(window).height();
    $(".flowMap").height(dHeight-35);
};